package com.zyg.jas.studentport.controller;

import com.zyg.jas.common.pojo.Score;
import com.zyg.jas.common.pojo.Tc;
import com.zyg.jas.common.pojo.Teacher;
import com.zyg.jas.studentport.service.ScoreService2;
import com.zyg.jas.studentport.service.TeaService2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.io.UnsupportedEncodingException;
import java.util.List;

@Controller
@RequestMapping("/sport/tea")
@CrossOrigin
public class TeaController2 {
    @Autowired
    private TeaService2 teaService2;



    // 获得教师相关信息
    @RequestMapping(value = "/selectTeaInfo/{courseId}",method = RequestMethod.GET)
    @ResponseBody
    public List<Tc> selectTeaInfo(@PathVariable("courseId") String courseId) {
//        String e =  new String(courseId.getBytes("ISO-8859-1"),"UTF-8");
//       String c  = new String(request.getParameter("courseId").getBytes("ISO-8859-1"),"UTF-8")
        System.out.println("teacherrrrrrrrrrrrrrrrrrrrrrrrr"+courseId);
        return this.teaService2.selectTeacher(courseId);

    }

}
